package cn.xgl6.springcloud.product.service.impl;

import cn.xgl6.springcloud.domain.Product;
import cn.xgl6.springcloud.product.mapper.ProductMapper;
import cn.xgl6.springcloud.product.service.ProductService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * @author xgl
 * @create 2020-05-14 15:26
 */
@Service
public class ProductServiceImpl implements ProductService {
    @Autowired
    private ProductMapper productMapper;
    @Override
    public Product getProductById(Integer id) {
        Product product = new Product();
        product.setPid(id);
        return productMapper.selectOne(product);
    }
}
